#!/bin/bash

set -e

chmod +x /usr/bin/map_curve_disk.sh
cp /usr/bin/map_curve_disk.sh /etc/init.d
update-rc.d map_curve_disk.sh defaults

CURVETAB=/etc/curve/curvetab
CURVETABBAK=/etc/curve/curvetab-bak

if [ -f ${CURVETABBAK} ]; then
    cp -f -p ${CURVETABBAK} ${CURVETAB}
    rm -f ${CURVETABBAK}
fi

exit 0
